package com.itheima.xxldemo.task;

import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component
public class DemoXxlJob {

    //定义了一个任务的名称
    @XxlJob("demoJobHandler")
    public void demoJobHandler() throws Exception {
        System.out.println(new Date()+" : 任务开始执行 , thread = " + Thread.currentThread().getName());
    }
}